import Ajax from "./Ajax"
import { ANALYSIS_CUSTOMER, ANALYSIS_SUPPLIPER, ANALYSIS_TOTAL,USER_ADD,USER_DELETE,USER_UPDATE,USER_UPDATE_PWD,ROLE_LIST } from "./url.config"

export function analysisCustomerApi() {
  return Ajax({
      url: ANALYSIS_CUSTOMER,
  })
}
/** 获取系统统计信息 */
export function systemInfoApi() {
  return Ajax({
    url: ANALYSIS_TOTAL
  })
}
/** 获取供应商统计信息 */
export function supplierInfoApi() {
  return Ajax({
    url: ANALYSIS_SUPPLIPER
  })
}

/** 用户编辑 */
export function userAddApi(data) {
  return Ajax({
      url: USER_ADD,
      method:"PUT",
      data
  })
}
export function userDeleteApi(id) {
  return Ajax({
      url: USER_DELETE+id,
      method:"DELETE"
  })
}
export function userUpdateApi(data) {
  return Ajax({
      url: USER_UPDATE,
      method:"POST",
      data
  })
}
export function userUpdatePwdApi(data) {
  return Ajax({
      url: USER_UPDATE_PWD,
      method:"POST",
      data
  })
}
export function roleListApi() {
  return Ajax({
      url: ROLE_LIST,
  })
}
